<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>${user.nickname} 的投票记录</title>
	<@tools.includePlace path="/76c53ac2-4f88-4ef3-984b-c81d00a48089.html"/> <#-- 头部Header -->
</head>
<body>
<@tools.includePlace path="/23e95a91-0063-4498-99ef-aa3fc4a79c4c.html"/> <#-- 导航 -->
<main>
	<div class="container">
		<@import path="/ftl/tools.ftl" namespace="t"/><#-- 工具 -->
		<div class="comment-box">
			<h3>${user.nickname}的投票记录</h3>
			<@cms.userVoteList userId=user.id pageIndex=pageIndex pageSize=10>
			<ul>
				<#list page.list as a>
				<@t.merge 'voteIds' a.id.voteId!/>
				<@t.merge 'itemIds' a.itemId!/>
				</#list>
				<@cms.vote ids=t.voteIds! ><#assign voteMap=map!/></@cms.vote>
				<@cms.voteItem ids=t.itemIds! ><#assign voteItemMap=map!/></@cms.voteItem>
				<#list page.list as a>
				<li class="underline">
					<p>${a.createDate?date} 参与了投票《<a href="${site.dynamicPath}member/vote.html?id=${a.id.voteId}" target="_blank">${voteMap[a.id.voteId?string].title}</a>》</p>
					<p><label>投给了:</label>《${voteItemMap[a.itemId?string].title}》</p>
				</li>
				<#else>
				<li class="underline"><p>没有数据</p></li>
				</#list>
			</ul>
			<div class="page">
				<#assign
				start=1
				end=page.totalPage
				/>
				<#if (page.pageIndex-5) gt start>
				<#assign start=page.pageIndex-4/>
				</#if>
				<#if (page.pageIndex+5) lt end>
				<#assign end=page.pageIndex+4/>
				</#if>
				<#if !page.firstPage>
				<a href="${getPage('userVoteList.html?id='+user.id,page.prePage,'pageIndex')}">上一页</a>
				<#else>
				<span>上一页</span>
				</#if>
				<#if start gt 1>
				<a href="${'userVoteList.html?id='+user.id}">1</a> ...
				</#if>
				<#list start..end as n>
				<a href="${getPage('userVoteList.html?id='+user.id,n,'pageIndex')}"${(n=page.pageIndex)?then(' class="selected"'?no_esc,'')}>${n}</a>
				</#list>
				<#if end lt page.totalPage>
				... <a href="${getPage('userVoteList.html?id='+user.id,page.totalPage,'pageIndex')}">${page.totalPage}</a>
				</#if>
				<#if !page.lastPage>
				<a href="${getPage('userVoteList.html?id='+user.id,page.nextPage,'pageIndex')}">下一页</a>
				<#else>
				<span>下一页</span>
				</#if>
			</div>
			</@cms.userVoteList>
		</div>
	</div>
</main>
	<script>
		var templatePath='${.current_template_name?keep_after('/')}';
	</script>
<@tools.includePlace path="/cc29e896-332a-46d8-9bcb-d48e92144e9c.html"/> <#-- 尾部Footer -->
</body>
</html>
